package com.newsoft.frame.codegen.parameter;

import java.io.Serializable;

import org.springframework.util.StringUtils;

/**
 * The property field of the entity.
 *
 * @author chenw
 */
public class Field implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 187952527617587926L;
    /** 表模型字段名称 */
    private String fieldName;
    /** 表模型字段类型 */
    private String fieldType;
    /** 表模型字段长度 */
    private String fieldLength;
    /** 表模型字段长度 */
    private String fieldPoint;
    /** 表模型字段首字母大写 */
    private String fieldNameUp;
    /** 数据库对应字段中文名称 */
    private String fieldCnName;
    /** 数据库对应字段编码 */
    private String columnName;
    /** 数据库对应字段类型 */
    private String columnType;
    /** 是否主键 */
    private String isPk;
    /** 是否数据字典 */
    private String isDict;
    /** 数据字典编码 */
    private String dictCode;
    /** 数据字典类型 */
    private String dictType;
    /** 是否金额类型 */
    private String isAmt;
    /** 是否数字类型 */
    private String isNumber;
    /** 是否利率类型 */
    private String isRate;
    /** 是否日期类型 */
    private String isDate;
    /** 是否字符串日期类型 */
    private String isStrDate;
    /** 是否必填类型 */
    private String isRequired;
    /** 是否长文本框 */
    private String isTextarea;
    /** 是否查询字段 */
    private String isQueryColumn;
    /** 是否排序字段 */
    private String isOrderColumn;
    /** 是否列表字段 */
    private String isListColumn;
    /** 是否form表单字段 */
    private String isFormColumn;
    /** 排序方式 */
    private String orderType;
    /** 查询方式 */
    private String queryType;
    /** 数据库对应字段备注 */
    private String columnComment;
    /** get名称 */
    private String getterName;
    /** set名称 */
    private String setterName;

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;

        // Set the getter and setter method name
        String capitalizedFieldName = StringUtils.capitalize(fieldName);
        this.getterName = "get" + capitalizedFieldName;
        this.setterName = "set" + capitalizedFieldName;
    }

    public String getFieldCnName() {
        return fieldCnName;
    }

    public void setFieldCnName(String fieldCnName) {
        this.fieldCnName = fieldCnName;
    }

    public String getFieldType() {
        return fieldType;
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    public String getFieldLength() {
        return fieldLength;
    }

    public void setFieldLength(String fieldLength) {
        this.fieldLength = fieldLength;
    }

    public String getFieldPoint() {
        return fieldPoint;
    }

    public void setFieldPoint(String fieldPoint) {
        this.fieldPoint = fieldPoint;
    }

    /**
     * @return the columnName
     */
    public String getColumnName() {
        return columnName;
    }

    /**
     * @param columnName the columnName to set
     */
    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getIsPk() {
        return isPk;
    }

    public void setIsPk(String isPk) {
        this.isPk = isPk;
    }

    public String getIsDict() {
        return isDict;
    }

    public void setIsDict(String isDict) {
        this.isDict = isDict;
    }

    public String getDictCode() {
        return dictCode;
    }

    public void setDictCode(String dictCode) {
        this.dictCode = dictCode;
    }

    public String getIsAmt() {
        return isAmt;
    }

    public void setIsAmt(String isAmt) {
        this.isAmt = isAmt;
    }

    public String getIsNumber() {
        return isNumber;
    }

    public void setIsNumber(String isNumber) {
        this.isNumber = isNumber;
    }

    public String getIsRate() {
        return isRate;
    }

    public void setIsRate(String isRate) {
        this.isRate = isRate;
    }

    public String getIsDate() {
        return isDate;
    }

    public void setIsDate(String isDate) {
        this.isDate = isDate;
    }

    public String getIsStrDate() {
        return isStrDate;
    }

    public void setIsStrDate(String isStrDate) {
        this.isStrDate = isStrDate;
    }

    public String getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(String isRequired) {
        this.isRequired = isRequired;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public String getIsQueryColumn() {
        return isQueryColumn;
    }

    public void setIsQueryColumn(String isQueryColumn) {
        this.isQueryColumn = isQueryColumn;
    }

    public String getIsOrderColumn() {
        return isOrderColumn;
    }

    public void setIsOrderColumn(String isOrderColumn) {
        this.isOrderColumn = isOrderColumn;
    }

    public String getIsListColumn() {
        return isListColumn;
    }

    public void setIsListColumn(String isListColumn) {
        this.isListColumn = isListColumn;
    }

    public String getIsFormColumn() {
        return isFormColumn;
    }

    public void setIsFormColumn(String isFormColumn) {
        this.isFormColumn = isFormColumn;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getQueryType() {
        return queryType;
    }

    public void setQueryType(String queryType) {
        this.queryType = queryType;
    }

    /**
     * @return the setterName
     */
    public String getSetterName() {
        return setterName;
    }

    /**
     * @param setterName the setterName to set
     */
    public void setSetterName(String setterName) {
        this.setterName = setterName;
    }

    /**
     * @return the getterName
     */
    public String getGetterName() {
        return getterName;
    }

    /**
     * @param getterName the getterName to set
     */
    public void setGetterName(String getterName) {
        this.getterName = getterName;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    public String getIsTextarea() {
        return isTextarea;
    }

    public void setIsTextarea(String isTextarea) {
        this.isTextarea = isTextarea;
    }

    public String getFieldNameUp() {
        return fieldNameUp;
    }

    public void setFieldNameUp(String fieldNameUp) {
        this.fieldNameUp = fieldNameUp;
    }

    /*
     * (non-Javadoc)
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "Field [fieldName=" + fieldName + ", fieldType=" + fieldType + ", columnName=" + columnName
            + ", columnComment=" + columnComment + "]";
    }

}
